#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

typedef long long ll;
typedef double db;
typedef vector < int > vec;
typedef pair < int , int > pii;

int n;

bool check(int l, int x) {
	cout << "? " << l << " " << 1 << endl;
	rep(i, 1, l) cout << i << " "; cout << endl;
	cout << x << endl; cin >> x; return x;
}

void solve() {
	cin >> n;
	rep(i, 2, n) {
		cout << "? 1 " << i - 1 << endl << i << endl;
		rep(j, 1, i - 1) cout << j << " "; cout << endl;
		int x; cin >> x;
		if(x) {
			vec pot;
			rep(j, i + 1, n) {
				cout << "? 1 1" << endl << i << endl << j << endl;
				int x; cin >> x; if(!x) pot.pb(j);
			}
			int l = 1, r = i - 1;
			while(l <= r) {
				int mid = l + r >> 1;
				if(check(mid, i)) r = mid - 1;
				else l = mid + 1; 
			}
			rep(j, 1, i - 1) if(j ^ l) pot.pb(j);
			cout << "! " << pot.size() << " " ; for(auto x : pot) cout << x << " "; cout << endl;
			return;
		}
	}
}

int main() {
	int t; cin >> t; while(t--) solve();
}
